﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="settings.aspx.cs" Inherits="AdminPack.Layouts.AdminPack.WorkflowOrganizer.settings" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server"><br />
    <div class="ms-vb" style="width:600px">When you add a workflow to an event handler, the workflow is automatically
        set not to run on create or change. If you remove a workflow from an event handler
        and wish to use it again, you will need to reset it's properties.</div>
    <br />
    <br />
    <br />
    <table width="600px" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnOK" CssClass="ms-buttonheightwidth" runat="server" Text="Back"
                    OnClick="btnOK_Click" />
            </td>
        </tr>
        <tr>
            <td style="width: 190px" >
                Workflow
            </td>
            <td style="width: 410px" >
                <asp:DropDownList ID="ddlWorkflows" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Event
            </td>
            <td>
                <asp:DropDownList ID="ddlEvents" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Delay (in seconds)
            </td>
            <td>
                <asp:DropDownList ID="ddlDelay" runat="server">
                <asp:ListItem>0</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
                <asp:ListItem>25</asp:ListItem>
                <asp:ListItem>30</asp:ListItem>
                </asp:DropDownList>
            </td>
        
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btnSave" runat="server" Text="Add" OnClick="btnSave_Click" class="ms-buttonheightwidth" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
    <asp:Label ID="lblError" Font-Bold="true" ForeColor="red" runat="server" CssClass="ms-vb"></asp:Label><br />
                <br />
                <SharePoint:SPGridView runat="server" ID="gvEvents" AutoGenerateColumns="false" DataKeyNames="ID"
                    OnRowCommand="gvEvents_RowCommand">
                    <HeaderStyle CssClass="ms-bold" />
                    <Columns>
                        <asp:BoundField DataField="Event" HeaderStyle-Font-Bold="true" HeaderText="Event" />
                        <asp:BoundField DataField="Workflow" HeaderStyle-Font-Bold="true" HeaderText="Workflow" />
                        <asp:BoundField DataField="Delay" HeaderStyle-Font-Bold="true" HeaderText="Delay" />
                        <asp:TemplateField>
                            <ItemTemplate>
                            <asp:LinkButton CommandArgument='<%# Bind("ID") %>' CommandName="up" ID="lnkBtnUp"
                                    Font-Bold="true" runat="server">Up</asp:LinkButton>
                            <asp:LinkButton CommandArgument='<%# Bind("ID") %>' CommandName="down" ID="lnkBtnDown"
                                    Font-Bold="true" runat="server">Down</asp:LinkButton>
                            &nbsp; &nbsp;
                                <asp:LinkButton CommandArgument='<%# Bind("ID") %>' CommandName="delete" ID="lnkBtnDelete"
                                    Font-Bold="true" runat="server">Delete</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </SharePoint:SPGridView>
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Organize Workflows
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Organize Workflows
</asp:Content>
